<template>
  <div class="block">
    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
      :page-sizes="pagesizes" :page-size="pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total">
    </el-pagination>
  </div>
</template>

<script>
  export default {
    props: {
      currentPage: {
        type: Number,
        default () {
          return 1
        }
      },
      total: {
        require: true,
        type: Number
      },
      pagesizes: {
        default () {
          return [20, 50, 70, 100]
        }
      },
      pagesize: {
        type: Number,
        default () {
          return 20
        }

      },

    },
    data() {
      return {};
    },
    methods: {
      handleSizeChange(val) {
        this.$emit("refpagesize", val)
      },
      handleCurrentChange(val) {
        this.$emit("refpagecurrent", val)
      }
    },
  }
</script>

<style scoped>
  .block {
    float: right;
  }
</style>